﻿<%@ Page Title="文件管理" Language="C#" MasterPageFile="~/UserClient/layout.master" AutoEventWireup="true"
    CodeBehind="File.aspx.cs" Inherits="Sunimage.Spjg.Web.UserClient.File" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href='<%=ResolveUrl("~/Themes/Default/UserClient/File.css") %>' type="text/css"
        rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphWorkspace" runat="server">
    <div class="ToolPanel">
        <span style="margin-left: 20px;">
            <asp:Button ID="btnToUpload" runat="server" Text="上传文件" />
        </span>
    </div>
    <div class="DataPanel">
        <asp:GridView ID="gvUsers" Width="100%" AutoGenerateColumns="false" runat="server"
            SkinID="List" DataKeyNames="ID" AllowPaging="true" PageSize="20" OnRowCommand="gvUsers_RowCommand"
            OnRowDataBound="gvUsers_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="No.">
                    <ItemStyle CssClass="listNo" />
                    <ItemTemplate>
                        <asp:Literal ID="LtrNo" runat="server"></asp:Literal></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="文件名">
                    <ItemTemplate>
                        <%# Eval("Title")%>
                    </ItemTemplate>
                    <ItemStyle CssClass="Title" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="备注">
                    <ItemTemplate>
                        <%# Eval("Remark")%>
                    </ItemTemplate>
                    <ItemStyle CssClass="Remark" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="上传日期">
                    <ItemTemplate>
                        <%# Eval("UploadTime")%>
                    </ItemTemplate>
                    <ItemStyle CssClass="datetime" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="&#160;">
                    <ItemTemplate>
                        <%-- <asp:ImageButton ID="ImageButton1" runat="server" SkinID="ListShare" ToolTip="共享"
                            CommandName="Share" CommandArgument='<%#Eval("Id") %>'></asp:ImageButton>
                        &nbsp;&nbsp;--%><asp:ImageButton ID="ImageButton2" runat="server" SkinID="ListDownload"
                            ToolTip="下载" CommandName="Download" CommandArgument='<%#Eval("Id") %>'></asp:ImageButton>
                        &nbsp;&nbsp;<asp:ImageButton ID="lbtnEdit" runat="server" SkinID="ListEdit" ToolTip="修改"
                            CommandName="EditUser" CommandArgument='<%#Eval("Id") %>'></asp:ImageButton>
                        &nbsp;&nbsp;<asp:ImageButton ID="lbtnDel" OnClientClick="return confirm('确定要删除本文件吗?');"
                            runat="server" SkinID="ListDelete" CommandName="DeleteUser" CommandArgument='<%#Eval("Id") %>'>
                        </asp:ImageButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="listOp" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="PagerPanel">
        <webdiyer:AspNetPager ID="pager" runat="server" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList"
            CssClass="paginator" CurrentPageButtonClass="cpb" TextBeforePageIndexBox="Page: "
            HorizontalAlign="Justify" PageSize="20" AlwaysShow="true" OnPageChanged="pager_PageChanged"
            CustomInfoHTML="共%PageCount%页，共%RecordCount%条数据" ShowCustomInfoSection="Right">
        </webdiyer:AspNetPager>
    </div>
    <ajaxToolKit:ModalPopupExtender ID="mpeUpload" runat="server" TargetControlID="btnToUpload"
        PopupControlID="PnlNewCommercer" CancelControlID="btnCancelNewCommercer" BackgroundCssClass="modalBackground"
        PopupDragHandleControlID="PnlNewCommercerCaption" Drag="false">
    </ajaxToolKit:ModalPopupExtender>
    <asp:Panel ID="PnlNewCommercer" runat="server" CssClass="modalBox" Style="display: none;
        width: 550px;">
        <asp:Panel ID="PnlNewCommercerCaption" runat="server" CssClass="caption" Style="margin-bottom: 10px;
            cursor: hand;">
            上传文件</asp:Panel>
        <div class="modalContent">
            <fieldset>
                <div>
                    <asp:Label ID="Label7" runat="server" AssociatedControlID="FileUpload1" Text="选择文件:"
                        CssClass="add"></asp:Label>
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                </div>
                <div>
                    <asp:Label ID="Label1" runat="server" AssociatedControlID="tbxRemark" Text="备注信息:"
                        CssClass="add"></asp:Label>
                    <asp:TextBox ID="tbxRemark" runat="server" TextMode="MultiLine" Rows="3" Width="300px"></asp:TextBox>
                </div>
            </fieldset>
            <div style="white-space: nowrap; text-align: center; margin-top: 1em;">
                <asp:Button ID="btnSaveNewCommercer" runat="server" Text="上传" CausesValidation="true"
                    ValidationGroup="NewCommercer" OnClick="btnSaveNewCommercer_Click" />
                <asp:Button ID="btnCancelNewCommercer" runat="server" CausesValidation="false" Text="取消" />
            </div>
        </div>
    </asp:Panel>
</asp:Content>
